package com.tianya.portal.blog.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tianya.portal.common.core.domain.BaseEntity;
import com.tianya.portal.system.domain.SysFile;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 日常随笔对象 blog_news_book
 * 
 * @author tianya
 * @date 2023-05-10
 */
public class BlogNewsBook extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private String id;

    /** 标题 */
    private String title;

    /** 内容 */
    private String content;

    /** 描述 */
    private String description;

    /** 作者 */
    private String author;

    /** 置顶标志 */
    private Long topFlag;

    /** 排序 */
    private Long orderNum;

    /** 阅读数量 */
    private Long viewNumber;

    /** 点赞数 */
    private Long likeNumber;

    /** 删除标志 */
    private String deleteFlag;

    /** 最后查看时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date lastViewTime;

    /** 预览图片编号 */
    private String imageId;
    /** 预览附件 */
    private SysFile sysFile;

    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }
    public void setAuthor(String author) 
    {
        this.author = author;
    }

    public String getAuthor() 
    {
        return author;
    }
    public void setTopFlag(Long topFlag) 
    {
        this.topFlag = topFlag;
    }

    public Long getTopFlag() 
    {
        return topFlag;
    }
    public void setOrderNum(Long orderNum) 
    {
        this.orderNum = orderNum;
    }

    public Long getOrderNum() 
    {
        return orderNum;
    }
    public void setViewNumber(Long viewNumber) 
    {
        this.viewNumber = viewNumber;
    }

    public Long getViewNumber() 
    {
        return viewNumber;
    }
    public void setLikeNumber(Long likeNumber) 
    {
        this.likeNumber = likeNumber;
    }

    public Long getLikeNumber() 
    {
        return likeNumber;
    }
    public void setDeleteFlag(String deleteFlag) 
    {
        this.deleteFlag = deleteFlag;
    }

    public String getDeleteFlag() 
    {
        return deleteFlag;
    }
    public void setLastViewTime(Date lastViewTime) 
    {
        this.lastViewTime = lastViewTime;
    }

    public Date getLastViewTime() 
    {
        return lastViewTime;
    }

    public String getImageId() {
        return imageId;
    }

    public void setImageId(String imageId) {
        this.imageId = imageId;
    }

    public SysFile getSysFile() {
        return sysFile;
    }

    public void setSysFile(SysFile sysFile) {
        this.sysFile = sysFile;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("content", getContent())
            .append("description", getDescription())
            .append("author", getAuthor())
            .append("topFlag", getTopFlag())
            .append("orderNum", getOrderNum())
            .append("viewNumber", getViewNumber())
            .append("likeNumber", getLikeNumber())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("deleteFlag", getDeleteFlag())
            .append("lastViewTime", getLastViewTime())
            .toString();
    }
}
